﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="MenuCatalogSetting.aspx.cs" Inherits="Admin_MenuCatalogSetting" Title="菜单项管理" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
    <tr>
        <td>
            <table style="width: 1000px; border: 0px;" cellspacing="0px" cellpadding="0px">
                <tr valign="middle">
                    <!--left-->
                    <td style="width: 70%" valign="top">
                        <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                            <tr style="width: 100%; height: 20px" align="left">
                                <td>
                                    <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                                       <tr style="height: 20px" align="left">
                                            <td style="width: 3%">
                                            </td>
                                            <td style="width: 65px" class="Guide">
                                                <label>
                                                    当前位置：</label>
                                            </td>
                                            <td style="width: 120px" class="Guide">
                                                <a href="AdminHome.aspx">滨海学院新闻网管理</a>
                                            </td>
                                            <td style="width: 20px" class="Guide">
                                                <label>
                                                    ></label>
                                            </td>
                                            <td class="Guide">
                                                <asp:Label ID="News_Edit" runat="server">菜单项管理</asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td style="width: 1px; background-color: #999999">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td> 
                                 <td style="width: 1px; background-color: #999999">
                                </td>
                            </tr>
                              
                            <tr>
                                <td>
                                    <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                                        <tr>
                                            <td align="left" valign="top">
                                                 <table style="width:100%; height: 5px; margin-bottom: 0px;">
                                                    <tr>
                                                        <td class="style9" bgcolor="Silver">
                                                            &nbsp;
                                                            </td>
                                                    </tr>
                                                </table>
                                                  <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Catalog_id" DataSourceID="SqlDataSource1" Width="100%" ShowFooter="True" ShowHeader="False" >
                                                        <Columns>
                                                            <asp:BoundField DataField="Catalog_id" HeaderText="Catalog_id" 
                                                                InsertVisible="False" ReadOnly="True" SortExpression="Catalog_id" 
                                                                Visible="False" />
                                                            <asp:BoundField DataField="CatalogName" 
                                                                SortExpression="CatalogName" >
                                                                <ItemStyle Font-Size="Small" HorizontalAlign="Center" />
                                                            </asp:BoundField>
                                                            <asp:CommandField ShowEditButton="True" >
                                                                <ItemStyle Font-Size="Small" Font-Underline="False" ForeColor="Black" 
                                                                    HorizontalAlign="Center" VerticalAlign="Middle" />
                                                            </asp:CommandField>
                                                        </Columns>
                                                    </asp:GridView>
                                                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                                            ConnectionString="<%$ ConnectionStrings:NewsConnectionString %>" 
                                                            SelectCommand="SELECT [Catalog_id], [CatalogName] FROM [Catalog]" 
                                                            
                                                            
                                                            UpdateCommand="UPDATE [Catalog] SET [CatalogName] = @CatalogName WHERE [Catalog_id] = @Catalog_id" 
                                                            DeleteCommand="DELETE FROM [Catalog] WHERE [Catalog_id] = @Catalog_id" 
                                                            InsertCommand="INSERT INTO [Catalog] ([CatalogName]) VALUES (@CatalogName)" >
                                                            <DeleteParameters>
                                                                <asp:Parameter Name="Catalog_id" Type="Int32" />
                                                            </DeleteParameters>
                                                            <UpdateParameters>
                                                                <asp:Parameter Name="Catalog_Name" />
                                                                <asp:Parameter Name="Catalog_id" />
                                                            </UpdateParameters>
                                                            <InsertParameters>
                                                                <asp:Parameter Name="CatalogName" Type="String" />
                                                            </InsertParameters>
                                                        </asp:SqlDataSource>
                                                <table style="width:100%; height: 5px; margin-bottom: 0px;">
                                                    <tr>
                                                        <td class="style9" bgcolor="Silver">
                                                            &nbsp;
                                                            </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td style="width: 1px; background-color: #999999">
                                </td>
                            </tr>
                          </td>
    </tr>
</asp:Content>

